import React from 'react';
import { string } from 'prop-types';
import './RecommandItem.less';

const propTypes = {
  id: string.isRequired,
  title: string.isRequired,
  imageUrl: string.isRequired,
  category: string.isRequired,
};

const RecommandItem = ({ id, title, imageUrl, category }) => (
  <div className="item">
    <div className="image">
      <img src={imageUrl} alt={title} />
    </div>
    <div className="item-info">
      <div className="item-title">{title}</div>
      <div className="item-category">{category}</div>
    </div>
  </div>
);

RecommandItem.propTypes = propTypes;
export default RecommandItem;
